import Vue from "vue";
import App from "./App.vue";
import router from "./router";
import store from "./store";
import ZkTable from "vue-table-with-tree-grid";
import VueQuillEditor from "vue-quill-editor";

import "quill/dist/quill.core.css";
import "quill/dist/quill.snow.css";
import "quill/dist/quill.bubble.css";

import "./utils";
import "./utils/ele.js";
import "./assets/css/global.css";
import "./assets/fonts/iconfont.css";

Vue.config.productionTip = false;
Vue.component("tree-table", ZkTable);
Vue.use(VueQuillEditor);

Vue.filter("dataFormat", function(originVal) {
  var date = new Date(originVal);
  var y = date.getFullYear();
  var m = (date.getMonth() + 1 + "").padStart(2, "0");
  var d = (date.getDate() + "").padStart(2, "0");
  var h = (date.getHours() + "").padStart(2, "0");
  var mm = (date.getMinutes() + "").padStart(2, "0");
  var s = (date.getSeconds() + "").padStart(2, "0");
  return `${y}-${m}-${d} ${h}:${mm}:${s}`;
});

new Vue({
  router,
  store,
  render: (h) => h(App),
}).$mount("#app");
